package com.lanou.mapper;

import com.lanou.bean.DynamicScore;
import com.lanou.bean.UserComments;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by dllo on 18/3/15.
 */
public interface UserCommentMapper {
    void insertUserComment(@Param("state") String state, @Param("designNum") Integer designNum, @Param("serviceNum") Integer serviceNum,
                           @Param("constructNum") Integer constructNum, @Param("userContent") String userContent, @Param("commentTime") String commentTime,
                           @Param("nickname") String nickname,@Param("commentLevel")String commentLevel, @Param("productId") Integer productId,
                           @Param("user_id") Integer user_id,@Param("company_id") Integer company_id);

    void insertRepeatComment(@Param("id") Integer id, @Param("repeatTime") String repeatTime, @Param("repeatContent") String repeatContent);

    List<UserComments> getProductComments(@Param("company_id") Integer company_id);

    List<UserComments> getAllComments(@Param("company_id") Integer company_id,@Param("commentLevel")String commentLevel,@Param("state")String state);

    DynamicScore getAVGScore(@Param("company_id") Integer company_id);

}
